<template>
  <div class="account-msg">
    <b-row class="user-card-wrapper">


      <div  class="user-card">
        <div class="user-card-pay">
          <!-- <img src="../../assets/img/user_password.png" alt=""> -->
          <div class="user-card-text">
            <!-- 支付密码 -->
            <p>{{$t('u_dlmm')}}</p>
            <!-- 設置交易密碼後才可以進行買賣、提幣等操作 -->
            <p>{{$t('dlmm')}}</p>
          </div>

          <div class="user-card-state">
            <!-- 去设置 -->
            <p  class=" jian_ce" ><span><img src="/static/img/zheng_que.png" alt="" style="width:14px;height:14px;margin-top:1px;color:#D75F5F"></span>{{$t('u_ysz')}}</p>

          </div>
          <div  class="btn" @click="tanchuan(3)">
            <!-- 去认证 -->
            {{$t('u_xgmm')}}
          </div>
        </div>
      </div><!-- 登录密码 -->

    </b-row>

    <div class="zhe_zhao" v-if="dianji==3"><!-- 登录密码 -->
        <div class="shi_ming_renzheng" style="height:580px;">
         <loginpwd-n v-on:child-say="tanchuanchuanzhi"></loginpwd-n>
        </div>
   </div>

    <!-- the modal -->
   
  </div>
</template>

<script>
import { mapActions, mapState } from "vuex";
import mixins from '../../assets/js/mixin';
import { isPhoneNum, userNameTransform, mathService, pop } from "../../assets/js/common";
import Nloginpwd from './login_pwd.vue'
import Nyouxiang from './youxiangbangding.vue'
import { BigNumber } from 'bignumber.js';
import QRCode from "qrcodejs2";
import ClipboardJS from '../../../static/clipboard.min';

export default {
  components:{
     'loginpwd-n':Nloginpwd,
     'youxiang-n':Nyouxiang
     },
  mixins: [mixins],
  data() {
    return {
      dianji:0,
      msg: "账户信息",
      items: [],

      tanchuang:0,

      userData: null,
      isHavePwd: false,

      userMobile: "",

      coinData: 0,
      moneyType: "",

      ifShowqr: true,

      inviteCode: '',
      inviteUrl: "",
      selected:this.$t('u_sfz'),
      authStatus:null,
      authInfo:null,

      once:false,
      youxiang:'0',

      name:"",

      userData:null,


    }
  },
  methods: {
    tanchuan(e){
      this.dianji = e;
      document.body.style.overflow='hidden';
      document.body.style.height='100%';
      document.documentElement.style.overflow='hidden'
    },
    tanchuanchuanzhi(){
      this.dianji = 0;
      document.body.style.overflow='visible';
      document.body.style.height='';
      document.documentElement.style.overflow='visible'
    },
    handleOk() {
      new ClipboardJS('.share-link');
    },
    bangdingyouxiang() {
      //获取邮箱绑定状态
     
      this.$http.post('/nb-web/api/user/email/exists'
      ).then(res => {
        if (res.data.code === "001"){
          this.youxiang = '1'
        }
      })
    },
    ...mapActions(['accountTabActiveChange', 'ifLoadingChange'])
  },
  created() {
    this.bangdingyouxiang()
    this.accountTabActiveChange(0);
    this.userMobile = this.$cookie.getCookie('account');
    console.log("youxiang"+this.userMobile)
    if (isPhoneNum(this.userMobile)) {
      this.userMobile = userNameTransform(this.userMobile);
    }
    
  },
  mounted() {
  }
}
</script>

<style lang="scss" scoped>
.account-msg{
  // width: 1020px;
  // height: 604px;
}
.container{
  width: 100%;
}
.nav_bg {
  background:#0f214a!important;
  position: static
}
.invite-btn {
  width: 120px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  border-radius: 4px;
  cursor: pointer;
  color: #ffefef;
  background-image: linear-gradient(0deg, #2d6df0, #27e7dd),
    linear-gradient(#37dfdd, #37dfdd);
  margin: 10px;
  }
  #invite-url {
    opacity: 0;
  }

  .qrcode-out {
    width: 100%;
    height: 150px;
    img {
      width: 150px;
      height: 150px;
      display: block;
      margin: 0 auto;
    }
  }
  .qrcode-text {
    text-align: center;
    font-size: 14px;
    display: block;
    margin: 20px auto;
  }

  .account-msg {
    table {
      thead {
        tr th {
          font-weight: normal;
          &:nth-child(1) {
            min-width: 180px;
          }
          &:nth-child(2) {
            min-width: 70px;
          }
          &:nth-child(3) {
            min-width: 100px;
          }
          &:nth-child(4) {
            min-width: 100px;
          }
          &:nth-child(5) {
            min-width: 100px;
          }
          &:nth-child(6) {
            min-width: 100px;
          }
          &:nth-child(7) {
            min-width: 120px;
          }
          &:nth-child(8) {
            min-width: 100px;
          }
          &:nth-child(9) {
            min-width: 80px;
          }
        }
      }
      tbody {
        tr td {
          font-size: 14px;
        }
      }
    }
  }

  .user-card-wrapper {
    // margin-top: 30px;
    .user-card {
      width: 462px;
      height: 144px;
      border-radius: 10px;
      margin-left:40px;
      margin-top:24px;
      > div {
        // height: 86px;
        // padding: 13px 0 13px 10px;
        margin-bottom: 8px;
        position: relative;
      }
      .qr-logo {
        width: 60px;
        height: 60px;
        background: #fff;
        border-radius: 50%;
        float: left;
        display: flex;
        justify-content: center;
        align-items: center;
        img {
          width: 35px;
          height: 35px;
        }
      }
      img {
        width: 60px;
        height: 60px;
        float: left;
      }

      .user-card-text {
        float: left;
        margin-left: 25px;
        margin-top:20px;
        p:nth-child(1) {
          font-family: PingFangSC-Medium;
          font-size: 24px;
          color: #1F3F87;
          letter-spacing: 0;
          line-height: 24px;
        }
        p:nth-child(2) {
          font-family: PingFangSC-Regular;
          font-size: 14px;
          color: #1F3F87;
          letter-spacing: 0;
          line-height: 30px;
        }
      }
      .user-card-state {
        position: absolute;
        top: 26px;
        left: 132px;
        padding-right: 20px;
        .goto-link {
          cursor: pointer;
          font-family: PingFangSC-Regular;
          font-size: 14px;
          color: #D75F5F;
          letter-spacing: 0;
          line-height: 14px;
        }
        p {
      
      

        }
      }
    }
    .user-card:nth-child(2), .user-card:nth-child(4){
      margin-left:-50px;
      
    }

    .user-card-phone {//支付密码
      background-color: #E6EEFF;
      width: 462px;
      height: 144px;
      border-radius: 8px;
      background: url("../../assets/img/bbs/user/zhi_fu_mi_ma.png")
    }
    .user-card-iden {//实名认证
      background-color: #E6EEFF;
      width: 462px;
      height: 144px;
      border-radius: 8px;
      background: url("../../assets/img/bbs/user/shi_ming_ren_zheng.png")
    }
    .user-card-login {//绑定邮箱
      background-color: #E6EEFF;
      width: 462px;
      height: 144px;
      border-radius: 8px;
      background: url("../../assets/img/bbs/user/bang_ding_you_xiang.png")
    }
    .user-card-pay {//登录密码
      
      width: 462px;
      height: 144px;
      background: #E6EEFF;
      border-radius: 8px;
      background: url("../../assets/img/bbs/user/jian_yi_mi_ma.png")
    }
  }

  //账户资产表格
  .user-amounts {
    padding-top: 10px;
    span {
      line-height: 53px;
      &:nth-child(1) {
        font-size: 16px;
        color: #666;
      }
      &:nth-child(2) {
        font-size: 30px;
        color: #1ec167;
      }
      &:nth-child(3) {
        font-size: 16px;
        color: #666;
      }
    }
  }

  .action-slot {
    min-width: 150px;
    span {
      font-size: 14px;
      color: #999;
      cursor: no-drop;
      &.action {
        cursor: pointer;
        color: #315dcf;
      }
    }
  }

  .btn{
    position: absolute;
      left: 24px;
      top: 94px;
    width: 100px;
    height: 30px;
    line-height: 15px;
    font-family: PingFangSC-Medium;
    font-size: 14px;
    background-image: linear-gradient(-90deg, #6CA5FF 1%, #5291FF 99%);
    border-radius: 4px;
    color: #FFFFFF;
    letter-spacing: 0;
    cursor: pointer;
    
  }
  .qu{
      margin-left: 358px;
      margin-top: 110px;
      width: 276px;
      height: 50px;
      background-image: linear-gradient(-90deg, #6CA5FF 1%, #5291FF 99%);
      border-radius: 10px;
      text-align: center;
      line-height: 45px;
      font-family: PingFangSC-Medium;
      font-size: 18px;
      color: #FFFFFF;
      letter-spacing: 0;
      cursor: pointer;
  }
  .jian_ce{
    font-family: PingFangSC-Regular;
    font-size: 14px;
    color: #6CB875;
    letter-spacing: 0;
    line-height: 14px;
  }







.zhe_zhao{
  position: fixed;
  z-index: 10000;
  top: 0;
  left: 0;
  width:100%;
  height:100%;
  background: rgba(9,21,48,0.40);
}
.shi_ming_renzheng{
  position: absolute;
      top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
  width:588px;
  height:640px;
  overflow-y:scroll;
  overflow: hidden;
  background: #FFFFFF;
  border-radius: 6px;
  // border:1px solid red;
}

</style>


